home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / BUS / Bitwise 1.51.sit / Bitwise 151 / Bitwise Manual next >
Text File  |  1995-10-13  |  19KB  |  353 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. INTRODUCTION
  9.  
  10. Bitwise is a versatile, yet easy to use, calculator with many unique features.  It was specifically designed for programmers of personal computers and microprocessors.  Some of Bitwiseユ key features include:
  11.  
  12.     ・ Reverse Polish Notation (RPN) operating logic
  13.     ・ Integer arithmetic in hexadecimal, decimal, octal, and binary
  14.     ・ Number base conversions
  15.     ・ Word sizes of 8, 16, and 32 bits
  16.     ・ Signed and unsigned integer modes
  17.     ・ Backspace key easily corrects input errors
  18.     ・ Optional byte/nibble marks & leading zeros
  19.     ・ Unique pop-up stack register display with register selection
  20.     ・ Logical operations and bit manipulations
  21.     ・ Carry, overflow, and remainder flags
  22.  
  23. Bitwise is shareware, which means you can use it on a trial basis for a few weeks to see if it meets your needs.  If you continue to use Bitwise on a regular basis, please register your copy by mailing your shareware payment of $10 (US funds only), along with your name & address to:
  24.  
  25.         Eric Curtis 
  26.         Bitwise Registration
  27.         212 Snow Camp Drive
  28.         Apex, NC 27502  U.S.A.
  29.  
  30. Once you register your copy of Bitwise, you are entitled to use future versions at no additional cost.
  31.  
  32.  
  33.  
  34. INSTALLATION
  35.  
  36. Since Bitwise is an application, it can be installed virtually anywhere on your Macintosh hard drive or floppy disk.  Simply drag the Bitwise application to the destination disk or folder.  If you are running System 7 or above, you may want to install Bitwise in the メApple Menu Itemsモ folder within the System Folder for convenient access from any program.
  37.  
  38.  
  39.  
  40. REVERSE POLISH NOTATION
  41.  
  42. Bitwise uses an operating logic called Reverse Polish Notation (RPN).  If you are already familiar with RPN, you may want to skip ahead to the section titled USING BITWISE.
  43.  
  44. RPN allows you to perform complex calculations without the need for parentheses or storing & recalling intermediate values.  Instead, calculations are performed using a memory メstackモ.
  45.  
  46. To perform a calculation, simply key in the first number, press the ENTER key, key in the second number, and finally press the desired operator key.  For example:
  47.  
  48. First, set the number base to decimal and clear the display by pressing the Dec & BSP keys.  (Note:  All examples in this manual are in base 10 unless otherwise noted.)
  49.  
  50.  
  51.  
  52.  
  53. The ENTER key is used to separate two numbers that are keyed in one after the other.  However, calculations can also be performed using values already present in the display.  For example:
  54.  
  55.  
  56.  
  57.  
  58. Note that in the preceding example the ENTER key was not needed.  This is because in both calculations the first numbers (1224 and 6120) were already in the display.
  59.  
  60.  
  61.  
  62. USING BITWISE
  63.  
  64. The Memory Stack:  The stack consists of four memory registers, referred to as X, Y, Z, and T.  The number in the X register is always shown in the calculatorユs display.  The registers are メstackedモ, one on top of the other, starting with the X register at the bottom.  The Y register appears on top of the X register, the Z register appears on top of the Y register, and finally the T register appears on top of the Z register, at the top of the stack.
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Stack Lift and Stack Drop:  Bitwise performs calculations by manipulating numbers on the stack.  Some operations cause the stack to be メliftedモ.  For example:
  71.  
  72. If the X register contains 2 and the Y register contains 1, keying in 3 causes the following to occur.  The value in T gets pushed off the top of the stack and is lost.  The value in Z gets copied to T, the value in Y gets copied to Z, the value in X gets copied to Y, and finally the value 3 replaces the original value in X.
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. Other operations cause the stack to be メdroppedモ.  For example:
  80.  
  81. If the X register contains 4 and the Y register contains 5, pressing + causes the value in X to be added to the value in Y and the result replaces the original value in X.  Furthermore, the value in Z gets copied to Y and the value in T gets copied to Z, thus completing the stack drop.
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. Also note that the value in T was regenerated when the stack dropped.  This allows it to be used as a constant in repetitive calculations.
  89.  
  90. Clearing the Display:  If digit entry is active (meaning that pressing a digit key doesnユt start a new number), pressing the BSP key deletes the last digit entered.  If digit entry has been terminated, pressing BSP clears the X register to zero.  Pressing ENTER and most other function keys terminates digit entry; this means the next digit keyed in becomes part of a new number.
  91.  
  92. Holding down the option key while pressing BSP clears the X register to zero regardless of whether digit entry is active or not.  The X register can also be cleared at any time by selecting Clear from the Edit Menu.
  93.  
  94. More Complex Calculations:  The RPN operating logic makes it easy to perform complex calculations without the need for parentheses or storing & recalling intermediate values.  For example:  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103. BITWISE KEYS
  104.  
  105. This section describes the function of each key on the Bitwise keypad.  Refer to the following figure.
  106.  
  107. Special Note:  Some keys have a tiny dot in their upper-left corner.  This signifies that the behavior of these keys can be modified (as described below) by clicking on them while holding down the option key.
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120. Hex, Dec, Oct, Bin:  These keys select the number base (hexadecimal, decimal, octal, or binary) in which the calculatorユs stack registers are displayed.  Clicking one of these keys at any time terminates digit entry and converts all registers to the selected number base.  Holding down the option key while clicking any of these keys temporarily displays the X register in the selected base while the mouse button is held down.  The current number base is indicated in the status area below the X register display.
  121.  
  122. 0 thru 9, A thru F:  These keys are used for digit entry.  The valid range of digits is determined by the selected number base.  Attempting to enter a digit greater than that allowed in the current number base results in a warning sound.  Digits can also be entered from the keyboard and numeric keypad.
  123.  
  124. S:U:  The S:U key toggles between signed integer and unsigned integer modes.
  125.  
  126. +, -, x, ヨ, RMD:  These keys perform arithmetic operations (addition, subtraction, multiplication, division, and remainder) using the values in the X and Y registers.  The stack is dropped after performing any of these operations and the result is placed in the X register.  The +, -, x, and ヨ operations set or clear the Carry and Overflow flags based on the result of the calculation.  The Overflow flag is set by either an overflow or underflow condition.  (Note: In division and remainder operations, if the remainder is not zero, the RMDュ0 flag is set; otherwise the flag is cleared.)  These operations can also be performed from the keyboard by pressing the +, -, *, /, and % keys.
  127.  
  128. ENTER:  When the ENTER key is pressed, digit entry is terminated and the stack is lifted.  This operation can also be performed from the keyboard by pressing the return or enter key.
  129.  
  130. BSP:  The BSP key is used to make corrections to a number being entered while digit entry is active.  Holding down the option key while clicking the BSP key clears the X register to zero.  If digit entry has been terminated, clicking the BSP key alone clears the X register to zero.  These operations can also be performed from the keyboard by pressing the delete or option delete keys.
  131.  
  132. X><Y:  The X><Y key exchanges the values in the X and Y registers.  This operation can also be performed from the keyboard by pressing the tab key.
  133.  
  134. 1ユS:  The 1ユS key performs a oneユs complement operation on the value in the X register.  This operation can also be performed from the keyboard by pressing the ~ key.
  135.  
  136. CHS:  The CHS (CHange Sign) key performs a twoユs complement operation on the value in the X register.
  137.  
  138. AND, OR, XOR:  These keys perform bitwise AND, OR, and Exclusive-OR operations using the values in the X and Y registers.  The stack is dropped after performing any of these operations and the result is placed in the X register.  These operations can also be performed from the keyboard by pressing the &, |, and ^ keys.
  139.  
  140. RL, RR:  These keys perform logical rotate-left and rotate-right operations (rotating left or right by one bit) on the value in the X register.  Holding down the option key while clicking the RL or RR keys rotates the bits thru the Carry flag.  These operations can also be performed from the keyboard by pressing the { and } keys.
  141.  
  142. SL, SR:  These keys perform logical shift-left and shift-right operations (shifting left or right by one bit) on the value in the X register.  If a 1 is shifted out of either the left or right side of the word, the Carry flag is set.  If a 0 is shifted out of either side, the Carry flag is cleared.  Holding down the option key while clicking the SR key performs an arithmetic shift-right (preserving the sign bit) when in Signed Integer mode.  These operations can also be performed from the keyboard by pressing the < and > keys.
  143.  
  144.  
  145.  
  146. BITWISE CALCULATOR MENU
  147.  
  148. This section describes the function of each menu item in the Calculator menu.  Refer to the following figure.
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167. Roll Down Stack:  This menu item rolls down the stack registers.  (i.e. the value in the Y register gets copied to the X register, the Z register gets copied to the Y register, the T register gets copied to the Z register, and finally the original X register value gets copied to the T register).  Rolling down the stack terminates digit entry.
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174. Set/Clear Carry Flag:  This menu item sets and clears the Carry flag.  The current state of the Carry flag is indicated in the status area below the X register display.
  175.  
  176. Signed Ints:  A check mark beside this menu item indicates that numbers will be interpreted as Signed integers.  The most significant bit (in the current word size) represents the sign bit.  If this bit is 1, the number is considered negative and in twoユs complement notation.  If the bit is 0, the number is considered positive.  When this menu item is unchecked, all numbers are interpreted as Unsigned (positive) integers.
  177.  
  178. Sign-Extension:  This menu item toggles on and off the use of sign-extension when in Signed integer mode.  If digit entry has been terminated, changing to a larger word size causes all registers to be sign-extended to the new word size.  Otherwise, if digit entry is still active, only the Y, Z, and T registers are sign-extended.  In Unsigned Integer mode, this menu item is dimmed.
  179.  
  180. Word Size:  This menu item sets the calculatorユs computational word size to 32 bits, 16 bits, or 8 bits (i.e. 4 bytes, 2 bytes, or 1 byte).  This is useful when working with microprocessors that use these sizes in their address and data registers.  Changing the word size does not terminate digit entry.  However, any values that are currently in the stack registers may be invalidated (due to truncation or not being sign-extended).  Attempting to enter a number greater than that allowed in the current word size results in a warning sound.  The current word size is indicated in the status area below the X register display.
  181.  
  182. Byte/Nibble Marks:  This menu item toggles on and off the byte and nibble marks when the calculatorユs number base is set to Binary.  In any other number base, this item is dimmed.
  183.  
  184. Leading Zeros:  This menu item toggles on and off the display of leading zeros when the calculatorユs number base is set to Hexadecimal, Octal, or Binary.  In the Decimal number base, this item is dimmed.  The number of leading zeros displayed is dependent on the current word size and number base.
  185.  
  186. Hexadecimal, Decimal, Octal, Binary:  These menu items select the number base in which the calculatorユs registers are displayed.  These items are equivalent to the Hex, Dec, Oct, and Bin keys on the calculatorユs keypad.
  187.  
  188.  
  189.  
  190. POP-UP STACK REGISTER DISPLAY
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. Clicking and holding the mouse pointer anywhere in the calculatorユs display pops up the Stack Register display window.  This window shows the current values in each of the four stack registers.  The X register is at the bottom, topped by the Y, Z, and T registers.  In the figure above, the X register contains 106A, Y register contains 35EBC, Z register contains 0, and T register contains 1133D.  All values are shown in the current number base (in this case, hexadecimal).
  205.  
  206. Dragging the mouse pointer up and down highlights each stack register as the pointer moves over it.  Releasing the mouse button when a particular value is highlighted hides the pop-up window and rolls down the stack, making the selected value the new X register.
  207.  
  208.  
  209.  
  210. HIDING THE KEYPAD
  211.  
  212.  
  213.  
  214.  
  215.  
  216. Clicking in the zoom box on the right of the calculatorユs title bar collapses the calculatorユs window to just the size of the display.  This saves screen space on computers with small monitors.  Most of the calculatorユs functions can still be performed from the keyboard and numeric keypad.  Clicking in the zoom box again restores the calculator to its full size.
  217.  
  218.  
  219.  
  220. THE OTHER MENUS
  221.  
  222. Apple Menu:  Selecting About Bitwiseノ shows the version number, author, and a brief list of keyboard equivalents.  (Note: Holding down the option key while dismissing the About box moves the calculatorユs window to its default location; centered on a 9 inch monitor.)
  223.  
  224. File Menu:  Selecting Quit saves all registers, modes, and window position on the desktop, then exits the application.
  225.  
  226. Edit Menu:  Bitwise supports the Cut, Copy, Paste, and Clear items of the standard Edit menu.  Bitwise can exchange values (from the X register only; in any of the four number bases) with other applications that support data exchange via the clipboard.  Only text can be pasted into Bitwise.  Attempting to paste anything else from the clipboard results in a warning sound and all stack registers remain unchanged.  Selecting the Clear item clears the X register to zero whether digit entry is active or not.
  227.  
  228.  
  229.  
  230. SUMMARY OF BITWISE FEATURES
  231.  
  232.     ・ RPN operating logic
  233.     ・ Continuous memory of all registers, modes, and window position on desktop
  234.     ・ Instant conversion between hexadecimal, decimal, octal, and binary
  235.     ・ Choose from word sizes of 8, 16, and 32 bits
  236.     ・ Backspace key corrects input errors without retyping entire number
  237.     ・ Optional byte/nibble marks in binary mode
  238.     ・ Optional leading zeros in hexadecimal, octal, and binary modes
  239.     ・ Unique pop-up stack register display with register selection
  240.     ・ Carry, overflow, and remainder flags
  241.     ・ Signed and unsigned integer modes
  242.     ・ Optional sign-extension of registers
  243.     ・ Add, subtract, multiply, divide, and remainder
  244.     ・ AND, OR, XOR, 1ユs & 2ユs complement
  245.     ・ Logical shift left, logical & arithmetic shift right
  246.     ・ Rotate left & rotate right, optionally thru the carry flag
  247.     ・ X Y register exchange key
  248.     ・ Stack roll down
  249.     ・ Temporarily show values in another base
  250.     ・ Full support of Cut, Copy, and Paste via the clipboard
  251.     ・ Display provides quick indication of flags, mode, word size, and number base
  252.     ・ Calculatorユs keypad can be hidden to save screen space
  253.     ・ Keyboard equivalents for most calculator functions
  254.     ・ Works with multiple monitors
  255.     ・ 32-bit clean and works with virtual memory
  256.     ・ Occupies about 35K of disk space and requires only 96K of RAM
  257.     ・ Works with System 6.0.5 and above, including System 7.x
  258.  
  259.  
  260.  
  261. ACKNOWLEDGMENTS
  262.  
  263. Iユd like to thank my good friend Herb Winters up in New Hampshire.  My original intent was to develop a practical calculator specifically aimed at the needs of programmers.  As a result of Herbユs continued encouragement and testing, Bitwise has turned out to be even better than I expected.
  264.  
  265.  
  266.  
  267. CONTACTING THE AUTHOR
  268.  
  269. Please mail your comments, suggestions, and bug reports to:
  270.  
  271.         Eric Curtis 
  272.         212 Snow Camp Drive
  273.         Apex, NC 27502  U.S.A.
  274.  
  275. or email them to:
  276.  
  277.         America Online:  Boston84
  278.         Internet:  boston84@aol.com
  279.  
  280.  
  281.  
  282. DISTRIBUTION
  283.  
  284. Since Bitwise is shareware, you are encouraged to copy and distribute Bitwise for non-commercial use.  Bitwise may be distributed via BBSs, user groups, and online services such as America Online, CompuServe, and GEnie.  The Bitwise Manual (i.e. this document you are presently reading) must accompany all copies for distribution.  You may not modify the Bitwise application or documentation in any way.
  285.  
  286. All other organizations, including (but not limited to) commercial disk vendors of shareware & public domain software, must obtain written permission from Eric Curtis to distribute copies of Bitwise if any fee is charged for the use, copying, or distribution of this product.
  287.  
  288.  
  289.  
  290. COPYRIGHT
  291.  
  292. This manual and the software described in it are copyrighted with all rights reserved.  Under the copyright laws, this manual or the software may not be copied, in whole or in part, without written permission from Eric Curtis, except in the normal use of the software or to make a backup copy.  The same proprietary and copyright notices must be affixed to any permitted copies as were affixed to the original.  Under the law, copying includes translating into another language or format.
  293.  
  294.  
  295.  
  296. DISCLAIMER OF WARRANTY AND LIABILITY
  297.  
  298. BITWISE IS SUPPLIED メAS ISモ.  ERIC CURTIS MAKES NO WARRANTY, EXPRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE OR DOCUMENTATION INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  299.  
  300. IN NO EVENT SHALL ERIC CURTIS, OR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, TESTING, PRODUCTION, DELIVERY, OR SUPPORT OF THE SOFTWARE OR THIS DOCUMENTATION, BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING FROM THE USE, THE RESULTS OF USE, OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  301.  
  302.  
  303.  
  304. CREDITS
  305.  
  306. Macintoshィ is a registered trademark of Apple Computer, Inc.  Other brands and their products are trademarks or registered trademarks of their respective companies and should be noted as such.
  307.  
  308.  
  309.  
  310. HISTORY
  311.  
  312. v1.5.1  13-Oct-95
  313.     ・ Calculator now appears correctly across multiple monitors with differing bit depths.
  314.  
  315. v1.5.0  28-Jul-95
  316.     ・ Rotate Left and Rotate Right, optionally thru the Carry flag.
  317.     ・ Keypad buttons for Signed/Unsigned mode and Change Sign.
  318.     ・ Updated mailing address.
  319.  
  320. v1.4.2  14-Mar-94
  321.     ・ Twoユs complement now correctly sets the overflow flag in unsigned mode.
  322.  
  323. v1.4.1  31-Dec-93
  324.     ・ Dynamic adjustment of Byte/Nibble marks according to word size.
  325.  
  326. v1.4.0  22-Nov-93
  327.     ・ Signed and Unsigned Integer modes.
  328.     ・ Optional Sign-Extension when changing to a larger word size.
  329.     ・ RMDュ0 flag.
  330.     ・ Twoユs Complement.
  331.     ・ Temporarily show values in another base.
  332.     ・ Arithmetic Shift Right.
  333.     ・ Improved internal error handling.
  334.     ・ Revised manual.
  335.  
  336. v1.3.1  22-Sep-93
  337.     ・ Fixed parameter type mismatches in several functions.
  338.  
  339. v1.3.0  02-Sep-93
  340.     ・ First public release.
  341.